﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;

namespace BorsoMediaPlayerEngine.modelos
{
    public class Musica
    {
        private String filePath;
        public String FilePath
        {
            get { return filePath; }
            set { filePath = value; }
        }

        private String fileName;
        public String FileName
        {
            get { return fileName; }
            set { fileName = value; }
        }

        public Musica(String filePath) : this(filePath, Path.GetFileNameWithoutExtension(filePath)) { }
        public Musica(String filePath, String fileName)
        {
            this.filePath = filePath;
            this.fileName = fileName;
        }

        public override bool Equals(object obj)
        {
            if ((obj != null) && (obj.GetType().Equals(this.GetType())))
            {
                return ((Musica)obj).FilePath.ToUpper().Equals(this.FilePath.ToUpper());
            }
            else
            {
                return base.Equals(obj);
            }
        }
    }
}
